<?php
    class Form_roles extends Zend_Form {
        
        
        public function init () {
            $controller = Zend_Controller_Front::getInstance();
            
            $name = $this->createElement('text', 'name');
            $name->addFilter('StringTrim');
            $name->setRequired(TRUE);
            $name->setAttribs(array('class'=>'inputStyle','maxlength'=>'80','order'=>1));
            $name->addErrorMessage("Por favor ingrese el nombre.");
            $this->addElement($name);

            $chkCirculacion = $this->createElement('checkbox', 'chkCirculacion');
            $chkCirculacion->addFilter('StringTrim');
            $chkCirculacion->setAttribs(array('order'=>2,'class'=>"listStyle"));
            $this->addElement($chkCirculacion);

            $chkCatalogacion = $this->createElement('checkbox', 'chkCatalogacion');
            $chkCatalogacion->addFilter('StringTrim');
            $chkCatalogacion->setAttribs(array('order'=>3,'class'=>"listStyle"));
            $this->addElement($chkCatalogacion);

            $chkReportes = $this->createElement('checkbox', 'chkReportes');
            $chkReportes->addFilter('StringTrim');
            $chkReportes->setAttribs(array('order'=>4,'class'=>"listStyle"));
            $this->addElement($chkReportes);

            $chkRespaldos = $this->createElement('checkbox', 'chkRespaldos');
            $chkRespaldos->addFilter('StringTrim');
            $chkRespaldos->setAttribs(array('order'=>6,'class'=>"listStyle"));
            $this->addElement($chkRespaldos);

            $chkAdministracion = $this->createElement('checkbox', 'chkAdministracion');
            $chkAdministracion->addFilter('StringTrim');
            $chkAdministracion->setAttribs(array('order'=>7,'class'=>"listStyle"));
            $this->addElement($chkAdministracion);            
            
            $hiddenedit = $this->createElement('hidden', 'hiddenedit');
            $hiddenedit->setValue("none");
            $this->addElement($hiddenedit); 
            
            $SaveNotification = $this->createElement('submit', 'SaveNotification');
            $SaveNotification->setAttribs(array('order'=>8,'class'=>"listStyle"));
            $SaveNotification->setLabel('Guardar');
            $this->addElement($SaveNotification);
            
            $this->setElementDecorators(array(
                array('ViewHelper'),
                array('Errors'),
            ));
        }
    }
?>